#! /bin/bash
for i in hadoop01 hadoop02 hadoop03
do
    echo --------- $i ----------
    ssh hadoop@$i "source /etc/profile;$*"
done